from django.conf.urls import url
from django.contrib import admin
from .views import indexviews,userviews,cateviews,goodsviews,orderviews
urlpatterns = [
    #后台首页
    url(r'^$', indexviews.index,name="myadmin_index"),
    # 权限管理
    # 管理员管理
    url(r'^auth/user/index/$',indexviews.myadmin_authuser_index,name="myadmin_authuser_index"),
    url(r'^auth/user/add/$',indexviews.myadmin_authuser_add,name="myadmin_authuser_add"),
    url(r'^auth/user/insert/$',indexviews.myadmin_authuser_insert,name="myadmin_authuser_insert"),
    
    # 权限组管
    url(r'^auth/group/index/$',indexviews.myadmin_authgroup_index,name="myadmin_authgroup_index"),
    url(r'^auth/group/add/$',indexviews.myadmin_authgroup_add,name="myadmin_authgroup_add"),
    url(r'^auth/group/insert/$',indexviews.myadmin_authgroup_insert,name="myadmin_authgroup_insert"),


    

    #用户列表页
    url(r'^vipuser/$',userviews.vipuser,name="myadmin_vipuser"),
    #添加用户
    url(r'^adduser/$',userviews.adduser,name="myadmin_adduser"),
    #删除用户
    url(r'^deluser/$',userviews.deluser,name="myadmin_deluser"),
    #修改用户
    url(r'^edituser/$',userviews.edituser,name="myadmin_edituser"),
    #重置密码
    url(r'^respwd/$',userviews.respwd,name="myadmin_respwd"),
    #修改状态
    url(r'^changes/$',userviews.changes,name="myadmin_changes"),
    
    url(r'^user/setstatus/$',userviews.user_set_status,name="myadmin_user_set_status"),



    #类别增删改查部分
    url(r'^addcate/$',cateviews.addcate,name="myadmin_addcate"),
    url(r'^catelist/$',cateviews.catelist,name="myadmin_catelist"),
    url(r'^delcate/$',cateviews.delcate,name="myadmin_delcate"),
    url(r'^editcate/$',cateviews.editcate,name="myadmin_editcate"),


    # 商品增删该查部分
    #添加商品
    url(r'^addgoods/$',goodsviews.addgoods,name="myadmin_addgoods"),
    url(r'^goodsinsert/$',goodsviews.goodsinsert,name="myadmin_goodsinsert"),
    #查询
    url(r'^goodslist/$',goodsviews.goodslist,name="myadmin_goodslist"),
    #修改商品
    url(r'^editgoods/$',goodsviews.editgoods,name="myadmin_editgoods"),
    #删除
    url(r'^delgoods/$',goodsviews.delgoods,name="myadmin_delgoods"),

    #登录
    url(r'^logoin/$',indexviews.myadminLogin,name="myadmin_login"),
    #退出登录
    url(r'^outlogin/$',indexviews.outlogin,name="myadmin_out"),
    
    #验证码
    url(r'^verifycode/$', indexviews.verifycode,name='myadmin_yzm'),

    #订单列表
    url(r'^orderlist/$', orderviews.orderlist,name='myadmin_orderlist'),
    #修改
    url(r'^orderedit/$', orderviews.orderedit,name='myadmin_orderedit'),
    #删除
    url(r'^orderdel/$', orderviews.orderdel,name='myadmin_orderdel'),





]